﻿//------------------------------------------------------------------------------
// <pcdd-entitiy>
//     彩票主流业务类库
//     房间管理业务对象
// </pcdd-entitiy>
//------------------------------------------------------------------------------ 

using CL.Game.DAL;
using CL.Game.Entity;
using System.Collections.Generic;
using System.Linq;

namespace CL.Game.BLL
{
    /// <summary>
    /// RoomManagerBLL 业务
    /// </summary>
    public class RoomManagerBLL
    {
        RoomManagerDAL dal = new RoomManagerDAL(Enum.Common.DbConnectionEnum.CaileGame);
        /// <summary>
        /// 插入对象
        /// </summary>
        /// <param name="Entity"></param>
        /// <returns></returns>
        public long InsertEntity(RoomManagerEntity Entity)
        {
            return dal.Insert_Long(Entity) ?? 0;
        }
        /// <summary>
        /// 更新对象
        /// </summary>
        /// <param name="Entity"></param>
        /// <returns></returns>
        public long ModifyEntity(RoomManagerEntity Entity)
        {
            return dal.Update(Entity);
        }
        /// <summary>
        /// 根据房间标识查询管理员列表
        /// </summary>
        /// <param name="RoomID"></param>
        /// <returns></returns>
        public List<RoomManagerEntity> QueryListByRoomID(long RoomID)
        {
            return dal.GetList(new { RoomID = RoomID }, "ManagerID ASC").ToList();
        }
    }
}
